<!DOCTYPE html>
<html >
<head>
    <title>新建地址</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="keywords" content=""/>
    <meta name="description"
          content=""/>
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">

    <meta name="format-detection" content="telephone=no"/>
    <link rel="stylesheet" href="/Public/css.css"/>

</head>
<body id="newAddress">
<script type="text/javascript">
    (function () {
        document.documentElement.style.fontSize = (document.body.offsetWidth/320) * 14 + 'px';
    })()
</script>
<div class="header">
    <a href="javascript:history.back(-1);" class="backbtn_02"></a>新建地址
</div>
<div id="main" lst_sku="{$lst_sku}" user_id="{$user_id}" class="content2" >

    <div class="registerbox">
        <div class="dt"><i></i>填写收货人信息</div>

        <div class="re_form">
            <label for="">姓名：</label><input id="consignee_name" type="text" placeholder="收货人姓名 "/>
        </div>

        <div class="re_form">
            <label for="">手机：</label><input id="consignee_cellphone" type="text" placeholder="收货人手机号码"/>
        </div>

        <div class="re_form">
            <label for="">固话：</label><input id="consignee_tel" type="text" placeholder="区号-电话号码(选填)"/>
        </div>
        <div class="re_form">
            <label for="">邮编：</label>
			<input id="consignee_zip" type="text" placeholder="邮编(选填)"/>
        </div>
        
        
        <div class="re_form">
            <label for="">省份：</label><select id="ssl_province">
            </select>
        </div>
        <div class="re_form">
            <label for="">城市：</label><select id="ssl_city" >

			</select>
        </div>
		<div class="re_form">
            <label for="">区：</label><select id="ssl_district">

			</select>
        </div>


        <div class="re_form last_form">
            <label for="">地址：</label><input id="consignee_address" type="text" placeholder="详细地址"/>
        </div>

    </div>
    
    <div class="loginact newaddress">
        <a href="javascript:;" class="hbtn">提  交</a>
    </div>

</div>


<script type="text/javascript" src="/Public/js/zepto.js"></script>
<script type="text/javascript" src="/Public/js/wj.js"></script>
<script type="text/javascript" src="/Public/js/ajaxService.js"></script>
<script type="text/javascript" src="/Public/js/common.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	CommonUtil.InitRegion();
	
	$('.hbtn').bind('click', function(){
		var param_en = {};
		param_en.consignee_name = $("#consignee_name").val();
		param_en.consignee_cellphone = $("#consignee_cellphone").val();
		param_en.consignee_tel = $("#consignee_tel").val();
		param_en.consignee_zip = $("#consignee_zip").val();
		param_en.consignee_address = $("#consignee_address").val();
		param_en.district_id = $("#ssl_district").val();
		
		var result = OrderService.AddAddress(param_en, 
				$('#main').attr('lst_sku'),
				$('#main').attr('user_id'));
		
		if(result.IsSuccess == 0){
			alert(result.ErrorMsg);
			return;
		}
		else{
			window.location.href = result.Result;
		}
	});
});
</script>
</body>
</html>